package br.com.cartools.entity.so;

import java.util.List;

import br.com.cartools.entity.car.CarComponent;

public class CostEstimate {

	private String car;
	private List<CarComponent> components;
	
	public CostEstimate(){
		
	}

	public String getCar() {
		return car;
	}

	public void setCar(String car) {
		this.car = car;
	}

	public List<CarComponent> getComponents() {
		return components;
	}

	public void setComponents(List<CarComponent> components) {
		this.components = components;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((car == null) ? 0 : car.hashCode());
		result = prime * result
				+ ((components == null) ? 0 : components.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CostEstimate other = (CostEstimate) obj;
		if (car == null) {
			if (other.car != null)
				return false;
		} else if (!car.equals(other.car))
			return false;
		if (components == null) {
			if (other.components != null)
				return false;
		} else if (!components.equals(other.components))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "CostEstimate [car=" + car + ", components=" + components + "]";
	}
	
	
}
